var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (cm.getMap().getNumMonsters() > 0) {
                cm.getTopMsgFont("地图剩余怪物：" + cm.getMap().getNumMonsters() + "", 3, 20, 4, 0, 0)
            } else {
                cm.sendNormalTalk("#b(拿出了嘉比的衣服。快把它交给阿贝尔特吧。)#k", 0, 2159301, false, false);
                cm.gainItem(4032757, 1)
            }
            cm.dispose()
        }
    }
};